package com.drcoffee.drcoffeemall.service;

import com.drcoffee.drcoffeemall.entry.BsPurview;
import com.drcoffee.drcoffeemall.entry.BsPurviewType;
import com.drcoffee.drcoffeemall.entry.BsUser;
import com.drcoffee.drcoffeemall.entry.Result;

import java.security.GeneralSecurityException;
import java.util.Map;

public interface BsUserService {
    /* 登录校验 */
    Result login(BsUser bsUser) throws GeneralSecurityException;

    /* 删除Token */
    boolean removeToken(String Token);

    /* 更新Token */
    void renewalToken(String Token);

    /* 验证Token */
    boolean verifyToken(String Token);

    /* 根据账号查询用户信息 */
    Result getBsUserByAccount(String account);

    Result getBsUser(String search);

    Result getBsPurviewByRole(Integer roleId);

    Result getBsRoleByUser(Integer id);

    Result getAllBsRole();


    Result getAllBsPurview();

    Result setPurviewByRole(Map<String, Object> role);

    Result deleteRole(Integer role_id);

    Result addBsUser(BsUser bsUser);

    Result deleteBsUser(Integer id);

    Result editBsUser(BsUser bsUser);

    Result addBsPurview(BsPurview bsPurview);

    Result editBsPurview(BsPurview bsPurview);

    Result deleteBsPurview(Integer id);

    Result addBsPurviewType(BsPurviewType bsPurviewType);

    Result editBsPurviewType(BsPurviewType bsPurviewType);

    Result deleteBsPurviewType(Integer id);

    Result setBsUserRole(Map<String, Object> bsUserRole);

}
